unit fWatermeterSel;

interface

uses
  Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
  Dialogs, dxExEdtr, dxTL, dxDBCtrl, dxDBGrid, dxCntner, DB, DBClient,
  uCommonclass, uCommonFunc, dxDBTLCl, dxGrClms, uCommonVar;

type
  TfrmWatermeterSel = class(TForm)
    dxdbgrd1: TdxDBGrid;
    dxdbgrdclmnWatermeterCode: TdxDBGridColumn;
    dxdbgrdclmnComments: TdxDBGridColumn;
    cds1: TClientDataSet;
    ds1: TDataSource;
    dxdbgrdmgclmnIsParent: TdxDBGridImageColumn;
    procedure FormCreate(Sender: TObject);
    procedure FormShow(Sender: TObject);
    procedure dxdbgrd1DblClick(Sender: TObject);
  private
    { Private declarations }
    gDBSuperMan: TDBSuperMan;    
  public
    { Public declarations }
  end;

var
  frmWatermeterSel: TfrmWatermeterSel;

implementation

{$R *.dfm}

procedure TfrmWatermeterSel.FormCreate(Sender: TObject);
begin
  gDBSuperMan := TDBInquireSuperMan.Create;
end;

procedure TfrmWatermeterSel.FormShow(Sender: TObject);
begin
  GC_SetImageColumnList(dxdbgrdmgclmnIsParent, flg_YesNo);

  gDBSuperMan.Table := 'BI_Watermeter';
  gDBSuperMan.DBGrid := dxdbgrd1;
  gDBSuperMan.FieldsPanel := nil;
  gDBSuperMan.PrepareData;
  gDBSuperMan.ExecuteOperate;
end;

procedure TfrmWatermeterSel.dxdbgrd1DblClick(Sender: TObject);
begin
  ModalResult := mrOk;
end;

end.
